package com.beadwallet.alarm.web;

import com.beadwallet.alarm.entity.msgInfo.Title;
import com.beadwallet.alarm.service.msg.TitleService;
import com.beadwallet.common.aspect.WebLog;
import com.beadwallet.common.controller.BaseController;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 * @author xingx
 * @date 2018/1/23
 */
@RestController
@RequestMapping("title")
@Api(value = "title", description = "短信发送信息", tags = "title")
public class TitleController extends BaseController {
    private static Logger log = LoggerFactory.getLogger(TitleController.class);
    @Autowired
    private TitleService titleService;
    @WebLog(description = "查询短信内容及创建时间")
    @PostMapping("/queryTitle")
    @ResponseBody
    public List<Title> queryTitle(String mobile){
        List<Title> titles = titleService.selectTitle(mobile);
        return titles;
    }
}
